package org.lyl.taobao.dao;

import org.lyl.taobao.api.entity.Order;

import java.sql.Connection;
import java.util.List;

/**
 * @Author: Re
 * @Date: 2021/4/9 20:46
 */
public interface IOrderDao {
    /**
     * 添加订单
     * @param connection
     * @param order
     * @return
     */
    boolean addOrder(Connection connection, Order order);

    /**
     * 查看用户的订单
     * @param connection
     * @param userId
     * @return
     */
    List<Order> checkOrder(Connection connection,Integer userId);

    /**
     * 取消订单
     * @param connection
     * @param orderId
     * @return
     */
    boolean deleteOrder(Connection connection,Integer orderId);
}
